#ifndef AUTOCOMPLETE_H
#define AUTOCOMPLETE_H

#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif


  class AutoComplete {
      bool active;
      std::string stopChars;
      std::string fillUpChars;
      char separator;
      char typesep;
      enum { maxItemLen = 1000 };
      std::vector<int> sortMatrix;

    public:

      bool ignoreCase;
      bool chooseSingle;
      ListBox *lb;
      int posStart;
      int startLen;

      bool cancelAtStartPos;
      bool autoHide;
      bool dropRestOfWord;
      unsigned int ignoreCaseBehaviour;
      int widthLBDefault;
      int heightLBDefault;

      int autoSort;

      AutoComplete();
      ~AutoComplete();


      bool Active() const;


      void Start( Window &parent, int ctrlID, int position, Point location,
                  int startLen_, int lineHeight, bool unicodeMode, int technology );


      void SetStopChars( const char *stopChars_ );
      bool IsStopChar( char ch );


      void SetFillUpChars( const char *fillUpChars_ );
      bool IsFillUpChar( char ch );


      void SetSeparator( char separator_ );
      char GetSeparator() const;


      void SetTypesep( char separator_ );
      char GetTypesep() const;


      void SetList( const char *list );


      int GetSelection() const;


      std::string GetValue( int item ) const;

      void Show( bool show );
      void Cancel();


      void Move( int delta );


      void Select( const char *word );
  };

  #ifdef SCI_NAMESPACE
}
  #endif

#endif
